package com.qd.panda.model;

import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.time.LocalDate;
import java.math.BigDecimal;
import java.time.LocalTime;

/**
 * 车位租赁信息
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_park_space")
public class ParkSpace extends Model<ParkSpace> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "sid", type = IdType.ASSIGN_ID)
    private String sid;
    /**
     * 租赁开始时间
     */
    @TableField("start_date")
    private LocalDate startDate;
    /**
     * 租赁结束时间
     */
    @TableField("end_date")
    private LocalDate endDate;
    /**
     * 租赁开始小时
     */
    @TableField("start_hour")
    private LocalTime startHour;
    /**
     * 租赁结束小时
     */
    @TableField("end_hour")
    private LocalTime endHour;
    /**
     * 租赁天数
     */
    @TableField("days")
    private Long days;
    /**
     * 发布时间
     */
    @TableField("publish_time")
    private LocalDateTime publishTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    /**
     * 状态:1运行中2停运中3已租赁
     */
    @TableField("state")
    private Integer state;
    /**
     * 预期日收益
     */
    @TableField("expected_day_revenue")
    private BigDecimal expectedDayRevenue;
    /**
     * 预期总收益
     */
    @TableField("expected_total_revenue")
    private BigDecimal expectedTotalRevenue;
    /**
     * 总收益
     */
    @TableField("total_revenue")
    private BigDecimal totalRevenue;
    /**
     * 扣费后总收益:扣除扣费金额和退款金额后的费用
     */
    @TableField("deduction_total_revenue")
    private BigDecimal deductionTotalRevenue;
    /**
     * 分成比例
     */
    @TableField("share_ratio")
    private Double shareRatio;
    /**
     * 退款金额
     */
    @TableField("refund_amount")
    private BigDecimal refundAmount;
    /**
     * 扣费金额
     */
    @TableField("deduction_amount")
    private BigDecimal deductionAmount;
    /**
     * 车位
     */
    @TableField("aid")
    private String aid;
    /**
     * 是否发布
     */
    @TableField("is_publish")
    private String isPublish;
    /**
     * 发布人
     */
    @TableField("publisher")
    private String publisher;
    /**
     * 停车场
     */
    @TableField("park_id")
    private String parkId;
    /**
     * 是否可租
     */
    @TableField("rentable")
    private String rentable;
    /**
     * 是否分账
     */
    @TableField("divide_accounts")
    private String divideAccounts;
    /**
     * 是否结束
     */
    @TableField("end")
    private String end;
    /**
     * 车位发布ID
     */
    @TableField("publish_id")
    private String publishId;
    /**
     * 租赁类型
     */
    @TableField("lease_type")
    private String leaseType;

    public void freeData() {
        this.sid = null;
        this.startDate = null;
        this.endDate = null;
        this.startHour = null;
        this.endHour = null;
        this.days = null;
        this.publishTime = null;
        this.updateTime = null;
        this.state = null;
        this.expectedDayRevenue = null;
        this.expectedTotalRevenue = null;
        this.totalRevenue = null;
        this.deductionTotalRevenue = null;
        this.shareRatio = null;
        this.refundAmount = null;
        this.deductionAmount = null;
        this.aid = null;
        this.isPublish = null;
        this.publisher = null;
        this.parkId = null;
        this.rentable = null;
        this.divideAccounts = null;
        this.end = null;
        this.publishId = null;
        this.leaseType = null;
    }

}
